package com.exampleyyy.demoyyy.common;

import lombok.Data;
@Data
public class R<self> {
    private  Integer code;
    private  String  msg;
    private   self data;
    public  static  <self>   R<self> success(Integer CODE,String MSG,self DATA){
        R<self> rrr = new R();
        rrr.code= CODE;
        rrr.msg = MSG;
        rrr.data= DATA;
        return  rrr ; 
    };
    public  static  <self>   R<self> error(Integer CODE,String MSG,self DATA){
        R rrr = new R();
        rrr.code=CODE;
        rrr.msg = MSG;
        rrr.data= DATA;
        return  rrr ;
    };
}
